<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Create a directory</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="streamwrapper.dir-rewinddir.html">« streamWrapper::dir_rewinddir</a></li>
      <li style="float: right;"><a href="streamwrapper.rename.html">streamWrapper::rename »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.streamwrapper.html">streamWrapper</a></li>
    <li>Create a directory</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="streamwrapper.mkdir" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">streamWrapper::mkdir</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">streamWrapper::mkdir</span> &mdash; <span class="dc-title">Create a directory</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-streamwrapper.mkdir-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>streamWrapper::mkdir</strong></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$path</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$mode</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code></span>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   This method is called in response to <span class="function"><a href="function.mkdir.html" class="function">mkdir()</a></span>.
  </p>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    In order for the appropriate error message to be returned this method
    should <em class="emphasis">not</em> be defined if the wrapper does not support
    creating directories.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-streamwrapper.mkdir-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">path</code></dt>

     <dd>

      <p class="para">
       Directory which should be created.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">mode</code></dt>

     <dd>

      <p class="para">
       The value passed to <span class="function"><a href="function.mkdir.html" class="function">mkdir()</a></span>.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">options</code></dt>

     <dd>

      <p class="para">
       A bitwise mask of values, such as <strong><code>STREAM_MKDIR_RECURSIVE</code></strong>.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-streamwrapper.mkdir-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>true</code></strong>， 或者在失败时返回 <strong><code>false</code></strong>。
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-streamwrapper.mkdir-errors">
  <h3 class="title">错误／异常</h3>
  <p class="para">调用此方法失败将给出
<strong><code>E_WARNING</code></strong>（未实现）。</p>
 </div>

 


 <div class="refsect1 notes" id="refsect1-streamwrapper.mkdir-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">注意</strong>: <p class="para">当合法的上下文传递给调用函数时，属性
<var class="varname">streamWrapper::$context</var>
会被改变。</p></p></blockquote>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-streamwrapper.mkdir-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.mkdir.html" class="function" rel="rdfs-seeAlso">mkdir()</a> - 新建目录</span></li>
    <li class="member"><span class="methodname"><a href="streamwrapper.rmdir.html" class="methodname" rel="rdfs-seeAlso">streamwrapper::rmdir()</a> - Removes a directory</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>